package com.zzptc.sky.translate;

import android.content.Context;
import android.content.SharedPreferences;

/**
 * Created by Administrator on 2017/11/2.
 */

public class Util {
    public static void set(Context context){
        //设置共享首选项
        SharedPreferences sharedPreferences = context.getSharedPreferences("loginnew", Context.MODE_APPEND);
        //获取编辑器
        SharedPreferences.Editor editor=sharedPreferences.edit();
        //一但设为true  下次进入就不会到引导页面
        //写入键值对
        editor.putBoolean("wel",true);
        editor.commit();
    }
    public static boolean get(Context context){
        SharedPreferences sharedPreferences = context.getSharedPreferences("loginnew", Context.MODE_APPEND);
        return sharedPreferences.getBoolean("wel",false);
    }
}
